package jbase.project.system.test;

import java.util.HashMap;
import java.util.Map;

import jbase.project.system.core.common.EventHook;
import jbase.project.system.net.http.HttpService;

public class Proxy {

	public static void main(String[] args) {
		Map<String, Object> config = new HashMap<String, Object>();
		HttpService http = new HttpService(new MyHook(), "127.0.0.1", 9999, true);
		http.activeServer(config);
	}

	public static class MyHook implements EventHook {

		@Override
		public <T, R> R event(String eventName, T... objects) {
			System.out.printf("事件名称：%s\n事件参数：", eventName);
			if (objects != null) {
				for (Object object : objects) {
					System.out.println(object);
				}
			}
			return (R) (Object) true;
		}

	}

}
